<template>
  <div>
    <div class="title">热点资讯 一手掌握</div>
    <div class="news">
      <div class="newsleft">
        <div class="news_tit">
          <div>+ 考生关注</div>
          <ul class="news_list_t">
            <li>考试动态</li>
            <li>雅思备考</li>
            <li>托福备考</li>
            <li>考前解析</li>
          </ul>
        </div>
        <ul class="news_list_c">
          <li class="news_list_item" v-for="(item, index) in articleList" :key="index">
            <div class="dongtai">动态</div>
            <div class="titleterm">{{item.title}}</div>
          </li>
        </ul>
      </div>
      <div class="newsright">
        <div class="news_tit">
          <div>+ 考生关注</div>
        </div>
        <div style="display:flex;align-item:center;margin:20px">
          <div style="width:20px;height:20px;line-height:20px;text-align:center;background:#2181f0;color:#fff;margin-right:20px;">1</div>
          <div>12233</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      articleList:[]
    }
  },
  created() {
    this.$http.get("http://47.92.50.43:8888/art/articlelist",{
      params:{
        sectionid:2,
        pageSize:10
      }
    }).then(res=>{
      this.articleList = res.data
      console.log(this.articleList);
      
    })
  }
};
</script>

<style scoped>
.news_list_item >.titleterm{
  width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news_list_item > .dongtai {
  width: 40px;
  height: 20px;
  line-height: 20px;
  background: #2181f0;
  color: #fff;
  text-align: center;
  margin-right: 20px;
}
.news_list_item {
  display: flex;
  font-size: 14px;
  align-items: center;
  width: 375px;
  margin: 5px 0;
}
.news_list_c {
  width: 750px;
  padding-top: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.newsleft .news_tit .news_list_t li:hover {
  padding: 0 20px;
  color: #000;
  border-bottom: 2px solid #2181f0;
}
.newsleft .news_tit .news_list_t li {
  padding: 0 20px;
  color: #717171;
  border-bottom: 2px solid transparent;
}
.newsleft .news_tit .news_list_t {
  display: flex;
  align-items: center;
}
.newsright .news_tit {
  width: 400px;
  height: 42px;
  line-height: 42px;
  background: #f9f9f9;
  justify-content: space-between;
}
.newsleft .news_tit {
  display: flex;
  width: 750px;
  height: 42px;
  line-height: 42px;
  background: #f9f9f9;
  justify-content: space-between;
}
.news {
  text-align: left;
  display: flex;
  justify-content: space-between;
}
.title {
  margin-top: 70px;
}
</style>